package com.wuliqing.android.zte.utils;

import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;

import java.util.Objects;

/**
 * Created by 10172915 on 2015/8/6.
 */
public class SharedPreferenceUtils {
    public static final String SharedPreference_Name = "contact_cache_data";
    public static final String FLOAT_WINDOW_FLAG = "float_window_flag";
    public static void putBooleanValue(Context context, String tag, Boolean value) {
        SharedPreferences mSharedPreferences = context.getSharedPreferences(SharedPreference_Name,
                Activity.MODE_PRIVATE);
        SharedPreferences.Editor editor = mSharedPreferences.edit();
        editor.putBoolean(tag,value);
        editor.commit();
    }

    public static boolean getBooleanValue(Context context, String tag){
        SharedPreferences mSharedPreferences = context.getSharedPreferences(SharedPreference_Name,
                Activity.MODE_PRIVATE);
        return mSharedPreferences.getBoolean(tag,false);
    }
}
